package com.time.auth.infra.basic.service.impl;

import com.time.auth.infra.basic.entity.AuthUserRole;
import com.time.auth.infra.basic.mapper.AuthUserRoleDao;
import com.time.auth.infra.basic.service.AuthUserRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 用户角色服务实现类
 *
 * @author: HuangQi
 * @date: Created in 11:35 2025/9/25
 * @description: 用户角色服务实现类
 */
@Service("authUserRoleService")
public class AuthUserRoleServiceImpl implements AuthUserRoleService {

    @Autowired
    private AuthUserRoleDao authUserRoleDao;

    @Override
    public List<Long> queryByUserId(Long id, String userType) {
        return this.authUserRoleDao.queryByUserId(id, userType);
    }

    @Override
    public Integer insert(AuthUserRole authUserRole) {
        return this.authUserRoleDao.insert(authUserRole);
    }

    @Override
    public Integer updateByRoleId(AuthUserRole authUserRole) {
        return this.authUserRoleDao.updateByRoleId(authUserRole);
    }

    @Override
    public Integer deleteByUserId(AuthUserRole authUserRole) {
        return this.authUserRoleDao.updateByUserId(authUserRole);
    }

    @Override
    public Integer updateByUserId(AuthUserRole authUserRole) {
        return this.authUserRoleDao.updateByUserId(authUserRole);
    }
}
